/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Abner Bastarrachea
 */
@Entity
@Table(name = "type_document")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TypeDocument.findAll", query = "SELECT t FROM TypeDocument t"),
    @NamedQuery(name = "TypeDocument.findByPkTypeDocument", query = "SELECT t FROM TypeDocument t WHERE t.pkTypeDocument = :pkTypeDocument"),
    @NamedQuery(name = "TypeDocument.findByTypeDocument", query = "SELECT t FROM TypeDocument t WHERE t.typeDocument = :typeDocument")})
public class TypeDocument implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pkTypeDocument")
    private Integer pkTypeDocument;
    @Basic(optional = false)
    @Column(name = "typeDocument")
    private String typeDocument;

    public TypeDocument() {
    }

    public TypeDocument(Integer pkTypeDocument) {
        this.pkTypeDocument = pkTypeDocument;
    }

    public TypeDocument(Integer pkTypeDocument, String typeDocument) {
        this.pkTypeDocument = pkTypeDocument;
        this.typeDocument = typeDocument;
    }

    public Integer getPkTypeDocument() {
        return pkTypeDocument;
    }

    public void setPkTypeDocument(Integer pkTypeDocument) {
        this.pkTypeDocument = pkTypeDocument;
    }

    public String getTypeDocument() {
        return typeDocument;
    }

    public void setTypeDocument(String typeDocument) {
        this.typeDocument = typeDocument;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pkTypeDocument != null ? pkTypeDocument.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TypeDocument)) {
            return false;
        }
        TypeDocument other = (TypeDocument) object;
        if ((this.pkTypeDocument == null && other.pkTypeDocument != null) || (this.pkTypeDocument != null && !this.pkTypeDocument.equals(other.pkTypeDocument))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.entidad.TypeDocument[ pkTypeDocument=" + pkTypeDocument + " ]";
    }
    
}
